import 'package:enjoy/pages/home/home_list.dart';
import 'package:enjoy/pages/home/home_nav.dart';
import 'package:flutter/material.dart';

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    // ignore: avoid_unnecessary_containers
    return Scaffold(
      backgroundColor: const Color.fromARGB(255, 229, 231, 241),
      appBar: AppBar(
        title: const Text(
          '享+社区',
          style: TextStyle(color: Colors.black),
        ),
        backgroundColor: const Color.fromARGB(255, 229, 231, 241),
        centerTitle: true,
      ),
      body: ListView(padding: const EdgeInsets.all(10), children: [
        const HomeNav(),
        const SizedBox(height: 10),
        ClipRRect(
          borderRadius: BorderRadius.circular(10),
          child: Image.asset(
            'assets/images/banner@2x.jpg',
            width: 200,
          ),
        ),
        const SizedBox(height: 10),
        const HomeList(),
      ]),
    );
  }
}
